﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GtsServer.DAL;
using GtsServer.Model;
using System.Data;
using GtsServer.Common;

namespace GtsServer.Manage.Controller
{
    public class EventController
    {
        EventDAL eventDal = new EventDAL();
        public List<Event> GetList(string strWhere = "")
        {
            DataSet ds = eventDal.GetList(strWhere);
            return IListDataSet.DataSetToIList<Event>(ds, 0).ToList();
        }

        public int Add(Event model)
        {
            return eventDal.Add(model);
        }

        public bool Update(Event model)
        {
            return eventDal.Update(model);
        }

        public bool Delete(int id)
        {
            return eventDal.Delete(id);
        }
    }
}
